<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录页面</title>
</head>
<body>
    <h1>登录</h1>
    <div style="color: red" th:if="${param.error}">
        用户名或者密码错误
    </div>
    <!--method必须为"post"-->
    <!--mylogin: 和登录页面保持一致即可，SpringSecurity自动进行登录认证-->
    <form th:action="@{/mylogin}" method="post">
        <div>
            <!--name必须为"username"-->
            <label>
                <input type="text" name="username" placeholder="用户名"/>
            </label>
        </div>
        <div>
            <!--name必须为"password"-->
            <label>
                <input type="password" name="password" placeholder="密码"/>
            </label>
        </div>
        <input type="submit" value="登录" />
    </form>
</body>
</html>